<template>
    <div id="myMain">
        <div class="displayFlexR" style="flex:1;">
            <div class="approval_details_left myMain-padding">
                <el-form :inline="true" label-width="150px" :model="formData" class="demo-form-inline">
                    <div class="title baseBG">基本信息</div>
                    <div class="line baseBG"></div>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="房屋编号：">
                                <el-input v-model="formData.houseNumber" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="区域：">
                                <el-input v-model="formData.region" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="楼栋：">
                                <el-input v-model="formData.bname" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="楼层：">
                                <el-input v-model="formData.high" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                         <el-col :span="12">
                            <el-form-item label="单元号：">
                                <el-input v-model="formData.unit" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="面积：">
                                <el-input v-model="formData.area" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="朝向：">
                                <el-input v-model="formData.aspect" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="装修情况：">
                                <el-input v-model="formData.decorateType" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="是否有电梯：">
                                <el-input v-model="formData.elevator" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                     <el-row>
                        <el-col :span="12">
                            <el-form-item label="单价/月：">
                                <el-input v-model="formData.rentType" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="总额/年：">
                                <el-input v-model="formData.Mprice" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <div class="title baseBG">企业信息</div>
                    <div class="line baseBG"></div>
                     <el-row>
                        <el-col :span="12">
                            <el-form-item label="企业名称：">
                                <el-input v-model="formData.fname" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="发起日期：">
                                <el-input v-model="formData.time" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                     <el-row>
                        <el-col :span="12">
                            <el-form-item label="企业法人：">
                                <el-input v-model="formData.corp" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="三证合一：">
                                <a :href="formData.card" download="myFileName">
                                    <vxe-button><i class="vxe-icon--download"></i>  压缩包</vxe-button>
                                </a>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="身份证：">
                                <el-input v-model="formData.nid" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="营业执照：">
                                <a :href="formData.charter" download="myFileName2">
                                    <vxe-button><i class="vxe-icon--download"></i>  压缩包</vxe-button>
                                </a>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="24">
                            <el-form-item label="联系方式：">
                                <el-input v-model="formData.phone" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="纳税人识别号：">
                                <el-input v-model="formData.alias" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="企业类型：">
                                <el-input v-model="formData.type" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="企业规模：">
                                <el-input v-model="formData.scale" disabled></el-input>
                            </el-form-item>
                        </el-col>
                         <el-col :span="12">
                            <el-form-item label="租赁时长：">
                                <el-input v-model="formData.leaseTime" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                       <el-col :span="24">
                            <el-form-item label="预计退租时间：">
                                <el-input v-model="formData.exitTime" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row class="lastRow">
                       <el-col :span="24">
                            <el-form-item label="退租说明：">
                                <el-input type="textarea" v-model="formData.explain" disabled></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
                <div class="btn">
                    <el-button class="baseBG fr" @click="submit">确认</el-button>
                </div>
            </div>
            
        </div>
    </div>
</template>
<style lang="scss" scoped>
@import '../../../styles/all';
#myMain{
    .approval_details_left{
        flex: 4;
        margin-right: 20px;
        .title{
            width: 92px;
            height: 30px;
            line-height: 20px;
            text-align: center;
            font-size: 18px;
            line-height: 30px;
        }
        .line{
            width: 100%;
            height: 5px;
            margin-bottom: 20px;
        }
        .lastRow{
            .el-form-item{
                width: 100% !important;
                ::v-deep.el-form-item__content{
                    width: 85%;
                }
            }
        }
        
    }
}
</style>
<script>
import $ from 'jquery'
import { getSettleInApprovalInfoById } from '@/api/enterprise_Manage'
export default {
    props: {
    },
    components:{},
    data(){
        return{
            formData: {
            },
            rowId: this.$route.query.data.id,
        }
    },
    methods:{
        async init(){
            let result = []
            await getSettleInApprovalInfoById(this.rowId).then(res =>{
                console.log('审批详情', res)
                result =  JSON.parse(JSON.stringify(res.data[0]))
            })
            result['Mprice'] = result['rentType'] * 12
            if(result['decorateType'] == 1){
                result['decorateType'] = '已装修'
            }else{
                result['decorateType'] = '未装修'
            }
            if(result['elevator'] == 1){
                result['elevator'] = '电梯房'
            }else{
                result['elevator'] = '步梯房'
            }
            this.formData = result
        },
        submit(){
            this.$router.go(-1)
        }
    },
    created(){},
    mounted(){
        this.init()
    },
}
</script>